﻿public abstract class BasePage : System.Web.UI.Page
{

    #region Properties

    public virtual string UniqueKey
    {
        get
        {
            string uniqueKey = string.Empty;

            if (ViewState["UniqueKey"] == null)
            {
                ViewState["UniqueKey"] = UtilitiesBLL.GenerateGuid();
            }

            uniqueKey = ViewState["UniqueKey"].ToString();

            return uniqueKey;
        }
    }

    #endregion

    protected abstract void ConfigControls();

    protected virtual void BindControls()
    {
    }

    protected void SetDefaultFormControls(string defaultButton, string defaultFocus)
    {
        if (!string.IsNullOrWhiteSpace(defaultButton))
            Form.DefaultButton = defaultButton;

        if (!string.IsNullOrWhiteSpace(defaultFocus))
            Form.DefaultFocus = defaultFocus;
    }

}